var pop_count = 0;

function post_image(gallery,class_num,class_name){
	var galleryHtml = "";
	var galleryLength = gallery.length;
	for (var i = 0; i < galleryLength; i++,pop_count++) {
		var tempHtml = `
		<!-- Portfolio box 1 -->
		<div class="col-xs-12 col-md-6 mix category-{0}">
		  <div class="portfolio-box">
			<img src={1} alt="">
			<!-- Image source -->
			<div class="portfolio-box-content">
			  <a class="lightbox" href="#popup-{2}">
				<!-- link to popup -->
				<div class="portfolio-content-title">
				  <h4>{3}
				  </h4>
				  <span>{4}
				  </span>
				</div>
			  </a>
			</div>
		  </div>
		  <!-- popup content -->
		  <div id="popup-{2}" class="mfp-hide popup-box">
			<img src={1} alt="">
			<!-- Image source -->
			<div>
			  <h4>{3}
			  </h4>
			  <p>{5}
			  </p>
			</div>
		  </div>
		  <!-- end popup content -->
		</div>
		`;
		var path = gallery[i].src.toString();
		var start=path.lastIndexOf("/")+1;
		var name = path.substr(start);
		name = name.split(".")[0];
		//分类 图片路径 弹窗id 作品名称 大类名称 简介
		tempHtml = tempHtml.format(class_num,path,pop_count,name,class_name,gallery[i].intruduction)
		galleryHtml +=tempHtml;
	}
	document.getElementById("class"+class_num).innerHTML = galleryHtml
}


post_image(resume_data.gallery_class_one,1,"工作")
post_image(resume_data.gallery_class_two,2,"插画")
post_image(resume_data.gallery_class_three,3,"其它")
